import javax.imageio.ImageIO;
import javax.swing.JPanel;
import net.miginfocom.swing.MigLayout;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import javax.swing.ImageIcon;
import javax.swing.JTextField;
import javax.swing.SwingConstants;


public class InventoryPanel extends JPanel{
	Image newImg;
	BufferedImage image;
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;
	private JTextField textField_5;
	private JTextField textField_6;
	public InventoryPanel() {
		
		ImageIcon icon = new ImageIcon("C:\\Users\\Akbar\\Desktop\\storebgfinal.jpg");
		Image img = icon.getImage();
		newImg = img.getScaledInstance(601, 497,  java.awt.Image.SCALE_SMOOTH);  
		
		setLayout(new MigLayout("", "[57.00][][89.00][110.00][][][][][][][][57.00][98.00,grow][52.00][50.00][34.00][61.00][28.00][56.00][][][][]", "[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]"));
		
		JLabel lblQuantity = new JLabel("#");
		add(lblQuantity, "cell 8 2");
		
		JLabel lblAmount = new JLabel("Amount");
		lblAmount.setHorizontalAlignment(SwingConstants.CENTER);
		add(lblAmount, "cell 12 2");
		
		JLabel lblPrice = new JLabel("Price");
		add(lblPrice, "cell 2 5");
		
		JLabel lblWeight = new JLabel("Weight");
		add(lblWeight, "cell 7 5");
		
		JLabel lblPrice_1 = new JLabel("Price");
		add(lblPrice_1, "cell 16 5");
		
		JLabel lblWeight_1 = new JLabel("Weight");
		add(lblWeight_1, "cell 19 5");
		
		JLabel label = new JLabel("#");
		add(label, "cell 21 5");
		
		JLabel lblWagonInventory = new JLabel("Wagon Inventory");
		lblWagonInventory.setFont(new Font("Times New Roman", Font.PLAIN, 14));
		add(lblWagonInventory, "cell 17 13");
		
		JLabel lblStoreInventory = new JLabel("Store Inventory");
		lblStoreInventory.setFont(new Font("Times New Roman", Font.PLAIN, 14));
		add(lblStoreInventory, "cell 3 21");
		
		textField_1 = new JTextField();
		add(textField_1, "cell 12 34,alignx leading,aligny center");
		textField_1.setColumns(10);
		
		textField_3 = new JTextField();
		add(textField_3, "cell 12 35,growx");
		textField_3.setColumns(10);
		
		textField_6 = new JTextField();
		add(textField_6, "cell 12 36,growx");
		textField_6.setColumns(10);
		
		textField_2 = new JTextField();
		add(textField_2, "cell 12 37,growx");
		textField_2.setColumns(10);
		
		textField_5 = new JTextField();
		add(textField_5, "cell 12 38,growx");
		textField_5.setColumns(10);
		
		textField = new JTextField();
		add(textField, "cell 12 39,growx");
		textField.setColumns(10);
		
		textField_4 = new JTextField();
		add(textField_4, "cell 12 40,growx");
		textField_4.setColumns(10);
	}
	
    public void paintComponent(Graphics g)
    {
    	
    	super.paintComponent(g);
    	g.drawImage(newImg, 0, 0, 601, 494, this);
    	
    }
	

}
